package cn.iocoder.yudao.module.trade.dal.mysql.depositorderlackbottles;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.trade.dal.dataobject.depositorderlackbottles.DepositOrderLackBottlesDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.trade.controller.admin.depositorderlackbottles.vo.*;

/**
 * 欠瓶记录 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface DepositOrderLackBottlesMapper extends BaseMapperX<DepositOrderLackBottlesDO> {

    default PageResult<DepositOrderLackBottlesDO> selectPage(DepositOrderLackBottlesPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DepositOrderLackBottlesDO>()
                .eqIfPresent(DepositOrderLackBottlesDO::getCode, reqVO.getCode())
                .eqIfPresent(DepositOrderLackBottlesDO::getCrmGasUserId, reqVO.getCrmGasUserId())
                .likeIfPresent(DepositOrderLackBottlesDO::getCrmName, reqVO.getCrmName())
                .likeIfPresent(DepositOrderLackBottlesDO::getSubmitName, reqVO.getSubmitName())
                .eqIfPresent(DepositOrderLackBottlesDO::getMobile, reqVO.getMobile())
                .eqIfPresent(DepositOrderLackBottlesDO::getAddress, reqVO.getAddress())
                .eqIfPresent(DepositOrderLackBottlesDO::getDescription, reqVO.getDescription())
                .betweenIfPresent(DepositOrderLackBottlesDO::getBottleShortageTime, reqVO.getBottleShortageTime())
                .betweenIfPresent(DepositOrderLackBottlesDO::getBottleReturnTime, reqVO.getBottleReturnTime())
                .eqIfPresent(DepositOrderLackBottlesDO::getBottleShortageDays, reqVO.getBottleShortageDays())
                .eqIfPresent(DepositOrderLackBottlesDO::getSteelCylinderCoding, reqVO.getSteelCylinderCoding())
                .eqIfPresent(DepositOrderLackBottlesDO::getChipEncoding, reqVO.getChipEncoding())
                .eqIfPresent(DepositOrderLackBottlesDO::getDeptId, reqVO.getDeptId())
                .inIfPresent(DepositOrderLackBottlesDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(DepositOrderLackBottlesDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DepositOrderLackBottlesDO::getId));
    }

}